/**
 * 
 */
package cn.edu.tju.mining.util;

/**
 * @author cjy
 *
 */
public class SpeedUtil {
	private String name;
	private long l =0;
	public SpeedUtil(String name){
		this.name=name;
		l =System.currentTimeMillis();
	}
	public void printSpeed(String s,boolean reset){
		long cost=System.currentTimeMillis()-l ;
	
		System.out.println("["+name+"] ["+s+"] "+cost+" ms cost!");
		if(reset){
			l=System.currentTimeMillis();
		}
	}
}
